<template>
<view class="my-com">
	<view class="top-com">
		
	<view class="avatar">
		<image class="img" src="https://img2.baidu.com/it/u=4284492163,2611934395&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500" mode=""></image>
	</view>

	</view>
	<view class="link-grid">
		<view @click="linkClick(item)" class="link-grid-item" v-for="(item,index) in userLinks" :key="index">
			<uni-icons color="#1296db" :type="item.icon" size="46"/>
			<view>{{item.label}}</view>
		</view>
	</view>
	<!-- <uni-section title="会员中心" type="line"> -->
		<uni-list>
			<uni-list-item v-for="(item,index) in links" :key="index" :title="item.label" link />
		</uni-list>
	<!-- </uni-section> -->

	
</view>
</template>

<script>
export default{
	data(){
		return{
			userLinks:[				
				{label:'账号设置',icon:'contact'},
				{label:'收件地址',icon:'navigate'},
				{label:'实名认证',icon:'auth-filled'},
			],
			links:[
				{label:'渠道商身份认证'},
				{label:'供货商身份申请'},
				{label:'线下样品'},
				{label:'平台样品'},
				{label:'平台客户'},
				{label:'线下客户'}
			],
			
		}
	},
	onLoad(){
		uni.getUserProfile({
			desc:'用于展示',
			success:function({userInfo}){
				console.log(userInfo)
			},
			complete(msg){
				console.log(msg)
			}
		})
	},
	methods:{
		linkClick({label}){
			switch(label){
				case '账号设置':
					uni.navigateTo({
					    url: '/pages/my/userSetting/index'
					});
					break
				case '收件地址':
					break
			}
		}
	}
}
</script>

<style lang="scss" scoped>
.my-com{
	background: $uni-bg-color-grey;
}
	.top-com{
		height: 350rpx;
		// background:linear-gradient(91deg,#f1eefc,#9dc6ff 70%,#a5bcff); ;
		background:linear-gradient(to right, #bb313e25, #bb313e25, #d7222925, #dd4a1625, #e4761525, #f5c50025, #f0e92725, #b1ce2425, #48a93525, #03944525, #157c4f25, #176a5825, #1b556325, #1d386f25, #1d386f25, #20277825, #52266325, #8a244b25);
		.avatar{
			text-align: center;
			padding: 20rpx;
			.img{
				width: 200rpx;
				height: 200rpx;
				border-radius: 100%;
			}
		}
	}
	
	.link-grid{
		font-size: 28rpx;
		margin:10rpx auto;
		width: 90%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: -100rpx;
		background: #FFFFFF;
		border-radius: 10rpx;
		.link-grid-item{
			width: 30%;
			text-align: center;
			margin: 30rpx 0;
		}
		
	}
</style>
